From: Jasper St. Pierre Date: Sun, 24 Jun 2012 06:26:39 +0000 (-0400) Subject: st-theme-node: Don't hold a ref to the theme context or the theme X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6426 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7eaf231e566e8a8470589e743bac10475c1ce987;p=gnome-shell.git st-theme-node: Don't hold a ref to the theme context or the theme This would just be a circular reference, which we need to avoid. https://bugzilla.gnome.org/show_bug.cgi?id=678737 --- diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index 765a3ee66..27a59f142 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -67,18 +67,6 @@ st_theme_node_dispose (GObject *gobject) { StThemeNode *node = ST_THEME_NODE (gobject); - if (node->context) - { - g_object_unref (node->context); - node->context = NULL; - } - - if (node->theme) - { - g_object_unref (node->theme); - node->theme = NULL; - } - if (node->parent_node) { g_object_unref (node->parent_node); @@ -194,7 +182,7 @@ st_theme_node_new (StThemeContext *context, node = g_object_new (ST_TYPE_THEME_NODE, NULL); - node->context = g_object_ref (context); + node->context = context; if (parent_node != NULL) node->parent_node = g_object_ref (parent_node); else @@ -204,7 +192,7 @@ st_theme_node_new (StThemeContext *context, theme = parent_node->theme; if (theme != NULL) - node->theme = g_object_ref (theme); + node->theme = theme; node->element_type = element_type; node->element_id = g_strdup (element_id);